package com.orange.handler;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import com.orange.dbhelp.page.Page;
import com.orange.modules.entity.expert.AuthExportGroupMap;
import com.orange.modules.entity.expert.AuthGroup;
import com.orange.modules.entity.school.AuthSchoolGroupMap;


public interface AuthExportGroupMapService {

	// 查找ID
	public AuthExportGroupMap queryAuthExportGroupMapById(String pid)
			throws SQLException;

	// 0：组员 1：副组长 2：组长 3：联络员
	public void saveAuthExportGroupMap(AuthExportGroupMap a) throws SQLException;

	/**
	 * 批量添加专家组员
	 * @param list
	 */
	public void addAuthExportGroupMapList(List<AuthExportGroupMap> list);
	
	/**
	 * 根据专家组id 查询所有绑定的 学校
	 * @param expertId
	 * @return
	 * @throws SQLException 
	 */
	public List<AuthExportGroupMap> queryAuthExportGroupMapByGroupId(String groupId) throws SQLException;
	
	/**
	 * 根据组id 分页查询所有绑定的 专家
	 * @param pageNumber
	 * @param pageSize
	 * @param condition
	 * @return
	 * @throws SQLException
	 */
	public Page<AuthExportGroupMap> queryAuthExportGroupMapPage(Map<String,String>map) throws SQLException;
	
	/**
	 * 根据组id 及身份 查询组员记录
	 * @param groupId
	 * @param identity
	 * @return
	 * @throws SQLException 
	 */
	public AuthExportGroupMap queryAuthExportGroupMapByIdentity(String groupId,String identity) throws SQLException;
	
	
	/**
	 * 根据id 删除专家组与组员关系记录
	 * @param pid
	 */
	public void deleteAuthExportGroupMapById(String pid);
	
	/**
	 * 根据现场考察专家id查询 现场考察专家身份
	 * @param expertId
	 * @return
	 * @throws SQLException 
	 */
	public AuthExportGroupMap queryAuthExportGroupMapByExpertId(String expertId) throws SQLException;
	
	/**
	 * 材料评审专家id查询 材料评审专家身份
	 * @param expertId
	 * @return
	 * @throws SQLException 
	 */
	public AuthExportGroupMap queryAuthExportGroupMapByExpertId1(String expertId) throws SQLException;
	
	/**
	 *  根据组id查询专家组的详细信息
	 */
	public Page<AuthGroup> queryAuthGroupInfoByPage(Map<String,String>map) throws SQLException;
	
	/**
	 * 材料评审专家组-根据专家id查询专家与组的关系
	 * @param groupId
	 * @param identity
	 * @return
	 * @throws SQLException 
	 */
	public AuthExportGroupMap queryAuthExportGroupMapByExpertId_material(String expertId) throws SQLException;

	/**
	 * 根据组的状态查询组id
	 * @throws SQLException 
	 */
	public List<AuthGroup> queryGroupIdByState(String state) throws SQLException;
	
	/**
	 * 根据组id查询专家id
	 * @throws SQLException 
	 */
	public List<AuthExportGroupMap> queryExpertIdByGroupId(String groupId) throws SQLException;
	
	/**
	 * 根据现场考察专家id查询 现场考察专家身份
	 * @param expertId
	 * @return
	 * @throws SQLException 
	 */
	public AuthExportGroupMap queryAuthExportGroupMapByExpertId2(String state, String expertId) throws SQLException;
	
	/**
	 * 查询组Id
	 * @throws SQLException 
	 */
	public AuthExportGroupMap queryGroupId(String expertId) throws SQLException;
	
	/**
	 * 删除(学校与组的关系材料汇总)
	 */
	public void deleteAuthSchoolGroupMap(String schoolId, String groupId) throws SQLException;
	
	/**
	 * 保存(学校与组的关系材料汇总)
	 */
	public void saveAuthSchoolGroupMap(AuthSchoolGroupMap as);
	
	/**
	 * 查询组id根据专家
	 * @throws SQLException 
	 */
	public AuthExportGroupMap querygroupIdByExpertId(String expertId) throws SQLException;
}
